import 'package:flutter_module/common/http/request/base_request.dart';

/// dic_requset.dart
/// Create by Ethanz
/// Date: 2021-08-26
///
/// Description:
///

// 字典类型
enum DicType {
  //服务对象
  SERVICE_PROVIDER,
}

///请求字典
class DicRequest extends BaseRequest {
  DicType type;

  DicRequest({required this.type}) {
    this.addQurey('dicType', _getDicTypeSting(type));
  }

  @override
  bool needLogin() {
    return false;
  }

  @override
  String path() {
    return '/coc/app/dict/ajax/dic_list';
  }

  @override
  RequestMethod requestMethod() {
    return RequestMethod.GET;
  }
}

String _getDicTypeSting(DicType type) {
  String str = "";
  switch (type) {
    case DicType.SERVICE_PROVIDER:
      {
        str = "SERVICE_PROVIDER";
        break;
      }
  }

  return str;
}
